package main

import (
	"fmt"
	"gopkg.in/mgo.v2"
)

type Person struct {
	Name  string
	Phone string
}

func main() {
	session, _ := mgo.Dial("127.0.0.1:27017")

	dbnames, _ := session.DatabaseNames()
	for _, dbname := range dbnames {
		fmt.Println(dbname)
	}
	session.SetMode(mgo.Monotonic, true)
	binfo, _ := session.BuildInfo()
	fmt.Println("bits:" + fmt.Sprintf("%d", binfo.Bits))
	fmt.Println("git version:" + binfo.GitVersion)
	fmt.Println("system info:" + binfo.SysInfo)
	fmt.Println("version:" + binfo.Version)
	session.Refresh()
	session.Close()
}
